<template>
    <el-dialog v-dialogDrag title="备注" :visible="show" width="40%" @close="dialogClose" :close-on-click-modal="false">

        <el-input type="textarea" :rows="3" v-model="remark" :readonly="power"></el-input>
        <el-button @click="dialogClose" style="margin-left:75%;margin-top: 20px;">取消</el-button>
        <el-button type="primary" @click="submit()">确定</el-button>

    </el-dialog>
</template>
<script>
export default {
    name: 'Remark',
    props: {
        show: {
            type: Boolean
        },
        text: {
            type: String
        },
        power: {
            type: Object
        }
    },

    data () {
        return {
            remark: ''
        }
    },
    methods: {
        dialogClose () {
            this.$emit('dialogClose')
        },
        submit () {
            this.$emit('dialog')
        },
        jilu () {
            return this.remark
        }
    },
    mounted () {
        this.remark = this.text
    }
}
</script>